// let username = document.getElementById('u6_input').value;
let username = "";
var table = "<tr>\n" +
    "                <td>序号</td>\n" +
    "                <td>用户名</td>\n" +
    "                <td>角色</td>\n" +
    "                <td>所属机构</td>\n" +
    "                <td>联系方式</td>\n" +
    "              </tr>";
$.ajax({
    url:"http://localhost:12345/user/list?username="+username,
    type:"GET",
    // datatype:"JSON",
    // contentType:"application/json",
    success:function(req){
        if(req.success) {
            console.log("obj   " + req.obj);
            req.obj.forEach((elem, index) => {
                console.log(elem, index);
                table += "<tr>";
                table += "<td>" + elem.id + "</td>";
                table += "<td>" + elem.userName + "</td>";
                table += "<td>" + elem.roleName + "</td>";
                table += "<td>" + elem.orgName + "</td>";
                table += "<td>" + elem.phone + "</td>";
                table += "</tr>";
            });
            document.getElementById("tfhover").innerHTML=table;
        }else {
            confirm(req.msg);
        }
        //请求成功
    }
});
function download() {
    window.location.href = "http://localhost:12345/user/export?username=";
}

